XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
Profiling of a periodic task: number of calls, duration (accumulated, average, max, std dev) and period.
More...
#include <core/common/profiling_unit.h>
Profiling of a periodic task: number of calls, duration (accumulated, average, max, std dev) and period.
◆ ProfilingUnit()
| wolf::ProfilingUnit::ProfilingUnit |
( |
double |
desired_period_sec = -1 | ) |
|
Constructor.
- Parameters
-
| desired_period_sec | Desired period in seconds. Negative value means not specified. Default is -1. |
◆ getAccDuration()
| double wolf::ProfilingUnit::getAccDuration |
( |
| ) |
const |
|
inline |
Returns the accumulated duration in seconds.
◆ getAveragePeriod()
| double wolf::ProfilingUnit::getAveragePeriod |
( |
| ) |
const |
|
inline |
Returns the average period in seconds.
◆ getAvgDuration()
| double wolf::ProfilingUnit::getAvgDuration |
( |
| ) |
const |
|
inline |
Returns the average duration in seconds.
◆ getDesiredPeriod()
| double wolf::ProfilingUnit::getDesiredPeriod |
( |
| ) |
const |
|
inline |
Returns the desired period in seconds.
◆ getMaxDuration()
| double wolf::ProfilingUnit::getMaxDuration |
( |
| ) |
const |
|
inline |
Returns the maximum duration in seconds.
◆ getNCallbacks()
| unsigned int wolf::ProfilingUnit::getNCallbacks |
( |
| ) |
const |
|
inline |
Returns the number of profiled calls.
◆ getStDevDuration()
| double wolf::ProfilingUnit::getStDevDuration |
( |
| ) |
const |
|
inline |
Returns the standard deviation of the duration in seconds.
◆ getVarDuration()
| double wolf::ProfilingUnit::getVarDuration |
( |
| ) |
const |
|
inline |
Returns the variance of the duration in seconds squared.
◆ isRunning()
| bool wolf::ProfilingUnit::isRunning |
( |
| ) |
const |
|
inline |
Returns whether the profiling of a call is running.
◆ printDuration()
| std::string wolf::ProfilingUnit::printDuration |
( |
double |
_duration_microsec, |
|
|
int |
precision = 2 |
|
) |
| const |
Returns a string of a duration (in us) in the most appropriate units with the specified precision.
- Parameters
-
| _duration_microsec | Duration in microseconds. |
| precision | Precision for printing the duration. Default is 2. |
◆ printProfiling()
| void wolf::ProfilingUnit::printProfiling |
( |
const std::string & |
_tabs, |
|
|
std::ostream & |
stream = std::cout |
|
) |
| const |
Prints the profiling results.
- Parameters
-
| _tabs | Tabs to be used for indentation. |
| stream | Output stream to print the results. Default is std::cout. |
◆ setDesiredPeriod()
| void wolf::ProfilingUnit::setDesiredPeriod |
( |
double |
_desired_period_sec | ) |
|
|
inline |
Sets the desired period in seconds.
◆ startProfiling()
| void wolf::ProfilingUnit::startProfiling |
( |
| ) |
|
Starts the profiling of a call.
◆ stopProfiling()
| void wolf::ProfilingUnit::stopProfiling |
( |
| ) |
|
Stops the profiling of a call.
◆ acc_duration_us_
| std::chrono::microseconds wolf::ProfilingUnit::acc_duration_us_ |
|
protected |
Accumulated duration in microseconds.
◆ average_period_us_
| double wolf::ProfilingUnit::average_period_us_ |
|
protected |
Average period in microseconds.
◆ desired_period_us_
| double wolf::ProfilingUnit::desired_period_us_ |
|
protected |
Desired period in microseconds (< 0 for not specified)
◆ first_clock_
| std::chrono::time_point<std::chrono::high_resolution_clock> wolf::ProfilingUnit::first_clock_ |
|
protected |
Time point of the first clock.
◆ max_duration_us_
| std::chrono::microseconds wolf::ProfilingUnit::max_duration_us_ |
|
protected |
Maximum duration in microseconds.
◆ n_callbacks_
| unsigned int wolf::ProfilingUnit::n_callbacks_ |
|
protected |
◆ running_
| bool wolf::ProfilingUnit::running_ |
|
protected |
True if profiling is running.
◆ start_clock_
| std::chrono::time_point<std::chrono::high_resolution_clock> wolf::ProfilingUnit::start_clock_ |
|
protected |
Time point of the start clock.
◆ var_duration_us_
| double wolf::ProfilingUnit::var_duration_us_ |
|
protected |
Variance of the duration in microseconds squared.
The documentation for this class was generated from the following files: